package kr.co.thornbacksoft.createadorationdb;

import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;

public class DBHandler {
	private DBHelper helper = null;
	private SQLiteDatabase db = null;

	public DBHandler(Context mContext) {
		this.helper = new DBHelper(mContext);
		this.db = helper.getWritableDatabase();
	}

	public static DBHandler open(Context mContext) throws SQLException {
		DBHandler handler = new DBHandler(mContext);

		return handler;
	}

	public void close() {
		helper.close();
	}

	public void insertDB(String str) {
		db.execSQL(str);
	}
}
